<?php
//$strThumbPath = "./images/thumbz/";
//$strDefaultPath = "./images/default/";
//Picture size set in CSS

echo "<div class='gallerycontainer'>";
//Loop through directory and echo results into a list
if(is_dir($strThumbPath)){
	$strHandle=opendir($strThumbPath);
	while ($strFile = readdir($strHandle)) {
		//if($strHandle){
			$strExt=strtolower(substr($strFile,-3,3));
			//echo "<br>$strFile pos $strPicturePrefix ".strpos($strFile,$strPicturePrefix);
			//if file is a jpg and page number and item number match
			$intPos = strpos($strFile,$strPicturePrefix);
			if($intPos === false){
			}else{
				echo "
						<a class='thumbnail' href='#thumb'><img src='".$strThumbPath.$strFile."' alt='$strFile' width='150' height='113'/><span><img src='".$strDefaultPath.$strFile."'  alt='' /></span></a>

				";
			}
		//}
	}
}
echo "</div>";
?>